# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 0.10.0
    Contact: thegrumpydictator@gmail.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class TransactionUpdate(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'bill_id': 'int',
        'bill_name': 'str',
        'book_date': 'date',
        'bunq_payment_id': 'str',
        'date': 'date',
        'description': 'str',
        'due_date': 'date',
        'external_id': 'str',
        'interest_date': 'date',
        'internal_reference': 'str',
        'invoice_date': 'date',
        'notes': 'str',
        'payment_date': 'date',
        'piggy_bank_id': 'int',
        'piggy_bank_name': 'str',
        'process_date': 'date',
        'sepa_batch_id': 'str',
        'sepa_cc': 'str',
        'sepa_ci': 'str',
        'sepa_country': 'str',
        'sepa_ct_id': 'str',
        'sepa_ct_op': 'str',
        'sepa_db': 'str',
        'sepa_ep': 'str',
        'tags': 'str',
        'transactions': 'list[TransactionSplitUpdate]',
        'type': 'str'
    }

    attribute_map = {
        'bill_id': 'bill_id',
        'bill_name': 'bill_name',
        'book_date': 'book_date',
        'bunq_payment_id': 'bunq_payment_id',
        'date': 'date',
        'description': 'description',
        'due_date': 'due_date',
        'external_id': 'external_id',
        'interest_date': 'interest_date',
        'internal_reference': 'internal_reference',
        'invoice_date': 'invoice_date',
        'notes': 'notes',
        'payment_date': 'payment_date',
        'piggy_bank_id': 'piggy_bank_id',
        'piggy_bank_name': 'piggy_bank_name',
        'process_date': 'process_date',
        'sepa_batch_id': 'sepa_batch_id',
        'sepa_cc': 'sepa_cc',
        'sepa_ci': 'sepa_ci',
        'sepa_country': 'sepa_country',
        'sepa_ct_id': 'sepa_ct_id',
        'sepa_ct_op': 'sepa_ct_op',
        'sepa_db': 'sepa_db',
        'sepa_ep': 'sepa_ep',
        'tags': 'tags',
        'transactions': 'transactions',
        'type': 'type'
    }

    def __init__(self, bill_id=None, bill_name=None, book_date=None, bunq_payment_id=None, date=None, description=None, due_date=None, external_id=None, interest_date=None, internal_reference=None, invoice_date=None, notes=None, payment_date=None, piggy_bank_id=None, piggy_bank_name=None, process_date=None, sepa_batch_id=None, sepa_cc=None, sepa_ci=None, sepa_country=None, sepa_ct_id=None, sepa_ct_op=None, sepa_db=None, sepa_ep=None, tags=None, transactions=None, type=None):  # noqa: E501
        """TransactionUpdate - a model defined in OpenAPI"""  # noqa: E501

        self._bill_id = None
        self._bill_name = None
        self._book_date = None
        self._bunq_payment_id = None
        self._date = None
        self._description = None
        self._due_date = None
        self._external_id = None
        self._interest_date = None
        self._internal_reference = None
        self._invoice_date = None
        self._notes = None
        self._payment_date = None
        self._piggy_bank_id = None
        self._piggy_bank_name = None
        self._process_date = None
        self._sepa_batch_id = None
        self._sepa_cc = None
        self._sepa_ci = None
        self._sepa_country = None
        self._sepa_ct_id = None
        self._sepa_ct_op = None
        self._sepa_db = None
        self._sepa_ep = None
        self._tags = None
        self._transactions = None
        self._type = None
        self.discriminator = None

        if bill_id is not None:
            self.bill_id = bill_id
        if bill_name is not None:
            self.bill_name = bill_name
        self.book_date = book_date
        self.bunq_payment_id = bunq_payment_id
        self.date = date
        self.description = description
        self.due_date = due_date
        self.external_id = external_id
        self.interest_date = interest_date
        self.internal_reference = internal_reference
        self.invoice_date = invoice_date
        if notes is not None:
            self.notes = notes
        self.payment_date = payment_date
        if piggy_bank_id is not None:
            self.piggy_bank_id = piggy_bank_id
        if piggy_bank_name is not None:
            self.piggy_bank_name = piggy_bank_name
        self.process_date = process_date
        self.sepa_batch_id = sepa_batch_id
        self.sepa_cc = sepa_cc
        self.sepa_ci = sepa_ci
        self.sepa_country = sepa_country
        self.sepa_ct_id = sepa_ct_id
        if sepa_ct_op is not None:
            self.sepa_ct_op = sepa_ct_op
        self.sepa_db = sepa_db
        self.sepa_ep = sepa_ep
        if tags is not None:
            self.tags = tags
        self.transactions = transactions
        self.type = type

    @property
    def bill_id(self):
        """Gets the bill_id of this TransactionUpdate.  # noqa: E501

        Optional. Use either this or the bill_name  # noqa: E501

        :return: The bill_id of this TransactionUpdate.  # noqa: E501
        :rtype: int
        """
        return self._bill_id

    @bill_id.setter
    def bill_id(self, bill_id):
        """Sets the bill_id of this TransactionUpdate.

        Optional. Use either this or the bill_name  # noqa: E501

        :param bill_id: The bill_id of this TransactionUpdate.  # noqa: E501
        :type: int
        """

        self._bill_id = bill_id

    @property
    def bill_name(self):
        """Gets the bill_name of this TransactionUpdate.  # noqa: E501

        Optional. Use either this or the bill_id  # noqa: E501

        :return: The bill_name of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._bill_name

    @bill_name.setter
    def bill_name(self, bill_name):
        """Sets the bill_name of this TransactionUpdate.

        Optional. Use either this or the bill_id  # noqa: E501

        :param bill_name: The bill_name of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._bill_name = bill_name

    @property
    def book_date(self):
        """Gets the book_date of this TransactionUpdate.  # noqa: E501


        :return: The book_date of this TransactionUpdate.  # noqa: E501
        :rtype: date
        """
        return self._book_date

    @book_date.setter
    def book_date(self, book_date):
        """Sets the book_date of this TransactionUpdate.


        :param book_date: The book_date of this TransactionUpdate.  # noqa: E501
        :type: date
        """

        self._book_date = book_date

    @property
    def bunq_payment_id(self):
        """Gets the bunq_payment_id of this TransactionUpdate.  # noqa: E501


        :return: The bunq_payment_id of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._bunq_payment_id

    @bunq_payment_id.setter
    def bunq_payment_id(self, bunq_payment_id):
        """Sets the bunq_payment_id of this TransactionUpdate.


        :param bunq_payment_id: The bunq_payment_id of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._bunq_payment_id = bunq_payment_id

    @property
    def date(self):
        """Gets the date of this TransactionUpdate.  # noqa: E501


        :return: The date of this TransactionUpdate.  # noqa: E501
        :rtype: date
        """
        return self._date

    @date.setter
    def date(self, date):
        """Sets the date of this TransactionUpdate.


        :param date: The date of this TransactionUpdate.  # noqa: E501
        :type: date
        """
        if date is None:
            raise ValueError("Invalid value for `date`, must not be `None`")  # noqa: E501

        self._date = date

    @property
    def description(self):
        """Gets the description of this TransactionUpdate.  # noqa: E501


        :return: The description of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this TransactionUpdate.


        :param description: The description of this TransactionUpdate.  # noqa: E501
        :type: str
        """
        if description is None:
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501

        self._description = description

    @property
    def due_date(self):
        """Gets the due_date of this TransactionUpdate.  # noqa: E501


        :return: The due_date of this TransactionUpdate.  # noqa: E501
        :rtype: date
        """
        return self._due_date

    @due_date.setter
    def due_date(self, due_date):
        """Sets the due_date of this TransactionUpdate.


        :param due_date: The due_date of this TransactionUpdate.  # noqa: E501
        :type: date
        """

        self._due_date = due_date

    @property
    def external_id(self):
        """Gets the external_id of this TransactionUpdate.  # noqa: E501

        Reference to external ID in other systems.  # noqa: E501

        :return: The external_id of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._external_id

    @external_id.setter
    def external_id(self, external_id):
        """Sets the external_id of this TransactionUpdate.

        Reference to external ID in other systems.  # noqa: E501

        :param external_id: The external_id of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._external_id = external_id

    @property
    def interest_date(self):
        """Gets the interest_date of this TransactionUpdate.  # noqa: E501


        :return: The interest_date of this TransactionUpdate.  # noqa: E501
        :rtype: date
        """
        return self._interest_date

    @interest_date.setter
    def interest_date(self, interest_date):
        """Sets the interest_date of this TransactionUpdate.


        :param interest_date: The interest_date of this TransactionUpdate.  # noqa: E501
        :type: date
        """

        self._interest_date = interest_date

    @property
    def internal_reference(self):
        """Gets the internal_reference of this TransactionUpdate.  # noqa: E501

        Reference to internal reference of other systems.  # noqa: E501

        :return: The internal_reference of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._internal_reference

    @internal_reference.setter
    def internal_reference(self, internal_reference):
        """Sets the internal_reference of this TransactionUpdate.

        Reference to internal reference of other systems.  # noqa: E501

        :param internal_reference: The internal_reference of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._internal_reference = internal_reference

    @property
    def invoice_date(self):
        """Gets the invoice_date of this TransactionUpdate.  # noqa: E501


        :return: The invoice_date of this TransactionUpdate.  # noqa: E501
        :rtype: date
        """
        return self._invoice_date

    @invoice_date.setter
    def invoice_date(self, invoice_date):
        """Sets the invoice_date of this TransactionUpdate.


        :param invoice_date: The invoice_date of this TransactionUpdate.  # noqa: E501
        :type: date
        """

        self._invoice_date = invoice_date

    @property
    def notes(self):
        """Gets the notes of this TransactionUpdate.  # noqa: E501


        :return: The notes of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._notes

    @notes.setter
    def notes(self, notes):
        """Sets the notes of this TransactionUpdate.


        :param notes: The notes of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._notes = notes

    @property
    def payment_date(self):
        """Gets the payment_date of this TransactionUpdate.  # noqa: E501


        :return: The payment_date of this TransactionUpdate.  # noqa: E501
        :rtype: date
        """
        return self._payment_date

    @payment_date.setter
    def payment_date(self, payment_date):
        """Sets the payment_date of this TransactionUpdate.


        :param payment_date: The payment_date of this TransactionUpdate.  # noqa: E501
        :type: date
        """

        self._payment_date = payment_date

    @property
    def piggy_bank_id(self):
        """Gets the piggy_bank_id of this TransactionUpdate.  # noqa: E501

        Optional. Use either this or the piggy_bank_name  # noqa: E501

        :return: The piggy_bank_id of this TransactionUpdate.  # noqa: E501
        :rtype: int
        """
        return self._piggy_bank_id

    @piggy_bank_id.setter
    def piggy_bank_id(self, piggy_bank_id):
        """Sets the piggy_bank_id of this TransactionUpdate.

        Optional. Use either this or the piggy_bank_name  # noqa: E501

        :param piggy_bank_id: The piggy_bank_id of this TransactionUpdate.  # noqa: E501
        :type: int
        """

        self._piggy_bank_id = piggy_bank_id

    @property
    def piggy_bank_name(self):
        """Gets the piggy_bank_name of this TransactionUpdate.  # noqa: E501

        Optional. Use either this or the piggy_bank_id  # noqa: E501

        :return: The piggy_bank_name of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._piggy_bank_name

    @piggy_bank_name.setter
    def piggy_bank_name(self, piggy_bank_name):
        """Sets the piggy_bank_name of this TransactionUpdate.

        Optional. Use either this or the piggy_bank_id  # noqa: E501

        :param piggy_bank_name: The piggy_bank_name of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._piggy_bank_name = piggy_bank_name

    @property
    def process_date(self):
        """Gets the process_date of this TransactionUpdate.  # noqa: E501


        :return: The process_date of this TransactionUpdate.  # noqa: E501
        :rtype: date
        """
        return self._process_date

    @process_date.setter
    def process_date(self, process_date):
        """Sets the process_date of this TransactionUpdate.


        :param process_date: The process_date of this TransactionUpdate.  # noqa: E501
        :type: date
        """

        self._process_date = process_date

    @property
    def sepa_batch_id(self):
        """Gets the sepa_batch_id of this TransactionUpdate.  # noqa: E501

        SEPA Batch ID  # noqa: E501

        :return: The sepa_batch_id of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._sepa_batch_id

    @sepa_batch_id.setter
    def sepa_batch_id(self, sepa_batch_id):
        """Sets the sepa_batch_id of this TransactionUpdate.

        SEPA Batch ID  # noqa: E501

        :param sepa_batch_id: The sepa_batch_id of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._sepa_batch_id = sepa_batch_id

    @property
    def sepa_cc(self):
        """Gets the sepa_cc of this TransactionUpdate.  # noqa: E501

        SEPA Clearing Code  # noqa: E501

        :return: The sepa_cc of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._sepa_cc

    @sepa_cc.setter
    def sepa_cc(self, sepa_cc):
        """Sets the sepa_cc of this TransactionUpdate.

        SEPA Clearing Code  # noqa: E501

        :param sepa_cc: The sepa_cc of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._sepa_cc = sepa_cc

    @property
    def sepa_ci(self):
        """Gets the sepa_ci of this TransactionUpdate.  # noqa: E501

        SEPA Creditor Identifier  # noqa: E501

        :return: The sepa_ci of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._sepa_ci

    @sepa_ci.setter
    def sepa_ci(self, sepa_ci):
        """Sets the sepa_ci of this TransactionUpdate.

        SEPA Creditor Identifier  # noqa: E501

        :param sepa_ci: The sepa_ci of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._sepa_ci = sepa_ci

    @property
    def sepa_country(self):
        """Gets the sepa_country of this TransactionUpdate.  # noqa: E501

        SEPA Country  # noqa: E501

        :return: The sepa_country of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._sepa_country

    @sepa_country.setter
    def sepa_country(self, sepa_country):
        """Sets the sepa_country of this TransactionUpdate.

        SEPA Country  # noqa: E501

        :param sepa_country: The sepa_country of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._sepa_country = sepa_country

    @property
    def sepa_ct_id(self):
        """Gets the sepa_ct_id of this TransactionUpdate.  # noqa: E501

        SEPA end-to-end Identifier  # noqa: E501

        :return: The sepa_ct_id of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._sepa_ct_id

    @sepa_ct_id.setter
    def sepa_ct_id(self, sepa_ct_id):
        """Sets the sepa_ct_id of this TransactionUpdate.

        SEPA end-to-end Identifier  # noqa: E501

        :param sepa_ct_id: The sepa_ct_id of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._sepa_ct_id = sepa_ct_id

    @property
    def sepa_ct_op(self):
        """Gets the sepa_ct_op of this TransactionUpdate.  # noqa: E501

        SEPA Opposing Account Identifier  # noqa: E501

        :return: The sepa_ct_op of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._sepa_ct_op

    @sepa_ct_op.setter
    def sepa_ct_op(self, sepa_ct_op):
        """Sets the sepa_ct_op of this TransactionUpdate.

        SEPA Opposing Account Identifier  # noqa: E501

        :param sepa_ct_op: The sepa_ct_op of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._sepa_ct_op = sepa_ct_op

    @property
    def sepa_db(self):
        """Gets the sepa_db of this TransactionUpdate.  # noqa: E501

        SEPA mandate identifier  # noqa: E501

        :return: The sepa_db of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._sepa_db

    @sepa_db.setter
    def sepa_db(self, sepa_db):
        """Sets the sepa_db of this TransactionUpdate.

        SEPA mandate identifier  # noqa: E501

        :param sepa_db: The sepa_db of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._sepa_db = sepa_db

    @property
    def sepa_ep(self):
        """Gets the sepa_ep of this TransactionUpdate.  # noqa: E501

        SEPA External Purpose indicator  # noqa: E501

        :return: The sepa_ep of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._sepa_ep

    @sepa_ep.setter
    def sepa_ep(self, sepa_ep):
        """Sets the sepa_ep of this TransactionUpdate.

        SEPA External Purpose indicator  # noqa: E501

        :param sepa_ep: The sepa_ep of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._sepa_ep = sepa_ep

    @property
    def tags(self):
        """Gets the tags of this TransactionUpdate.  # noqa: E501

        Comma-separated list of tags.  # noqa: E501

        :return: The tags of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this TransactionUpdate.

        Comma-separated list of tags.  # noqa: E501

        :param tags: The tags of this TransactionUpdate.  # noqa: E501
        :type: str
        """

        self._tags = tags

    @property
    def transactions(self):
        """Gets the transactions of this TransactionUpdate.  # noqa: E501


        :return: The transactions of this TransactionUpdate.  # noqa: E501
        :rtype: list[TransactionSplitUpdate]
        """
        return self._transactions

    @transactions.setter
    def transactions(self, transactions):
        """Sets the transactions of this TransactionUpdate.


        :param transactions: The transactions of this TransactionUpdate.  # noqa: E501
        :type: list[TransactionSplitUpdate]
        """
        if transactions is None:
            raise ValueError("Invalid value for `transactions`, must not be `None`")  # noqa: E501

        self._transactions = transactions

    @property
    def type(self):
        """Gets the type of this TransactionUpdate.  # noqa: E501

        Type of transaction  # noqa: E501

        :return: The type of this TransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this TransactionUpdate.

        Type of transaction  # noqa: E501

        :param type: The type of this TransactionUpdate.  # noqa: E501
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["withdrawal", "transfer", "deposit", "opening-balance", "reconciliation"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, TransactionUpdate):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
